extends Control


func _on_迷雾森林_pressed():
	ObjectManager.soundManager.play(SoundType.button_click)
	if !GameUtils.checkIsReadyAction() || !GameUtils.checkActionEnough(SpendData.COST_灵阵_迷雾森林):
		return
	ObjectManager.gameManager.operationManager.changeOperationType(OperationType.灵阵_迷雾森林)
	visible = false
	ObjectManager.gameManager.ui.closeDesc()


func _on_佛法慈悲_pressed():
	ObjectManager.soundManager.play(SoundType.button_click)
	if !GameUtils.checkIsReadyAction() || !GameUtils.checkActionEnough(SpendData.COST_灵阵_佛法慈悲):
		return
	ObjectManager.gameManager.operationManager.changeOperationType(OperationType.灵阵_佛法慈悲)
	visible = false
	ObjectManager.gameManager.ui.closeDesc()

func _on_九曲黄河_pressed():
	ObjectManager.soundManager.play(SoundType.button_click)
	if !GameUtils.checkIsReadyAction() || !GameUtils.checkActionEnough(SpendData.COST_灵阵_九曲黄河):
		return
	ObjectManager.gameManager.operationManager.changeOperationType(OperationType.灵阵_九曲黄河)
	visible = false
	ObjectManager.gameManager.ui.closeDesc()


func _on_地狱杀伐_pressed():
	ObjectManager.soundManager.play(SoundType.button_click)
	if !GameUtils.checkIsReadyAction() || !GameUtils.checkActionEnough(SpendData.COST_灵阵_地狱杀伐):
		return
	ObjectManager.gameManager.operationManager.changeOperationType(OperationType.灵阵_地狱杀伐)
	visible = false
	ObjectManager.gameManager.ui.closeDesc()


func _on_迷雾森林_mouse_entered():
	var ui = ObjectManager.gameManager.ui as UI
	ui.wantShowDesc("迷雾森林：消耗3点能量，自身为阵眼，敌方丢失阵中落点视野")


func _on_九曲黄河_mouse_entered():
	var ui = ObjectManager.gameManager.ui as UI
	ui.wantShowDesc("九曲黄河：消耗3点能量，自身为阵眼，敌方非转型大子在阵中移动和攻击后受到一次伤害")


func _on_地狱杀伐_mouse_entered():
	var ui = ObjectManager.gameManager.ui as UI
	ui.wantShowDesc("地狱杀伐：消耗2点能量，自身为阵眼，己方大子在阵中攻击成功后行能量2")


func _on_mouse_exited():
	var ui = ObjectManager.gameManager.ui as UI
	ui.closeDesc()
